package com.zhongge.controller;


import com.zhongge.entity.Dict;
import com.zhongge.service.impl.DictServiceImpl;
import com.zhongge.vo.DictVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhongge
 * @since 2025-11-09
 */
@Controller
@RequestMapping("/dict")
public class DictController {
    @Autowired
    private DictServiceImpl dictService;

    //查询字典表中的假期相关信息：假期字典值+假期名称
    @GetMapping("/holidays")
    @ResponseBody
    public List<DictVO> getHolidayKeyValue(){
       return dictService.getHolidayKeyValue();
    }
}
